package top.wshape1.shiziapi.project.service;

import com.baomidou.mybatisplus.extension.service.IService;
import top.wshape1.shiziapi.project.domain.Like;

import java.util.List;

/**
 * @author Wshape1
 * @description 针对表【t_project_like】的数据库操作Service
 * @since 2023-11-22 15:47:55
 */
public interface LikeService extends IService<Like> {

    /**
     * 点赞
     *
     * @param projectId
     * @param userId
     */
    void like(Long projectId, Long userId);

    /**
     * 取消点赞
     *
     * @param projectId
     * @param userId
     */
    void unlike(Long projectId, Long userId);

    /**
     * 获取点赞数
     *
     * @param projectId
     * @return
     */
    long countLike(Long projectId);

    /**
     * 获取点赞状态
     *
     * @param projectIdList
     * @param userId
     * @return
     */
    List<Boolean> isLike(List<Long> projectIdList, Long userId);
}
